Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore blank lines in playlist -- fixes panic w/EXT-X-MAP. #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ejohnst
Copy link

@ejohnst ejohnst commented Dec 22, 2021

reader.go panics if there's a blank line between the header containing EXT-X-MAP and the first segment for FMP4 media playlists. (It tries to add MAP to the first segment, which it hasn't created yet.)

Patch fixes this by ignoring blank lines; reader_test.go updated to work with change (one of the tests assumed prior behavior).

@eric confirms this is consistent with the standard:

Lines in a Playlist file are terminated by either a single line feed
character or a carriage return character followed by a line feed
character. Each line is a URI, is blank, or starts with the
character '#'. Blank lines are ignored. Whitespace MUST NOT be
present, except for elements in which it is explicitly specified.

Issue seems to have been previously reported as #166.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant